import config from "@/config"
import http from "@/utils/request"

export default {
    task: {
		getMyTaskListForDesk: {
			url: `${config.API_URL}/get/union/getMyTaskListForDesk`,
			name: "获取桌面个人任务",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getTaskProcessInfo: {
			url: `${config.API_URL}/get/union/getTaskProcessInfo`,
			name: "获取处理事件详情",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		insertTaskProcess: {
			url: `${config.API_URL}/set/union/insertTaskProcess`,
			name: "添加子任务处理结果",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		deleteTaskProcess: {
			url: `${config.API_URL}/set/union/deleteTaskProcess`,
			name: "删除子任务处理结果",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		updateTaskProcess: {
			url: `${config.API_URL}/set/union/updateTaskProcess`,
			name: "修改子任务的处理过程",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		getGanttInfoByTaskId: {
			url: `${config.API_URL}/get/union/getGanttInfoByTaskId`,
			name: "获取Gantt详情",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getTaskById: {
			url: `${config.API_URL}/get/union/getTaskById`,
			name: "获取任务详情",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getMyTaskWorkList: {
			url: `${config.API_URL}/get/union/getMyTaskWorkList`,
			name: "获取我的任务",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getMyTaskWorkListForApp: {
			url: `${config.API_URL}/get/union/getMyTaskWorkListForApp`,
			name: "获取我的任务",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getMyChargeTaskList: {
			url: `${config.API_URL}/get/union/getMyChargeTaskList`,
			name: "获取负责和督查的任务",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getTaskAllocationList: {
			url: `${config.API_URL}/get/union/getTaskAllocationList`,
			name: "获取所有待分配子任务列表",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		insertTaskGanttLink: {
			url: `${config.API_URL}/set/union/insertTaskGanttLink`,
			name: "创建关联",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		deleteTaskGanttLink: {
			url: `${config.API_URL}/set/union/deleteTaskGanttLink`,
			name: "删除关联关系",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		updateTaskGanttLink: {
			url: `${config.API_URL}/set/union/updateTaskGanttLink`,
			name: "更新子任务路径",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		getAssignmentTaskList: {
			url: `${config.API_URL}/get/union/getAssignmentTaskList`,
			name: "获取待分解任务列表",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		insertTaskGanttData: {
			url: `${config.API_URL}/set/union/insertTaskGanttData`,
			name: "创建子任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		deleteTaskGanttData: {
			url: `${config.API_URL}/set/union/deleteTaskGanttData`,
			name: "删除子任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		updateTaskGanttData: {
			url: `${config.API_URL}/set/union/updateTaskGanttData`,
			name: "更新子任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		insertTask: {
			url: `${config.API_URL}/set/union/insertTask`,
			name: "创建任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		deleteTask: {
			url: `${config.API_URL}/set/union/deleteTask`,
			name: "删除任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		deleteTaskByIds: {
			url: `${config.API_URL}/set/union/deleteTaskByIds`,
			name: "批量删除任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		updateTask: {
			url: `${config.API_URL}/set/union/updateTask`,
			name: "更新任务",
			post: async function (data, config = {}) {
				return await http.post(this.url, data, {
					headers: {}
				});
			}
		},
		searchTaskList: {
			url: `${config.API_URL}/get/union/searchTaskList`,
			name: "任务查询",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getManageTaskList: {
			url: `${config.API_URL}/get/union/getManageTaskList`,
			name: "获取任务列表",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getMyTaskProcessList: {
			url: `${config.API_URL}/get/union/getMyTaskProcessList`,
			name: "获取子任务的处理过程列表",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
	},
}